using System;
using System.Collections.Generic;
using WWB.DisqusSharp.Model.DisqusDTO;

namespace WWB.DisqusSharp.Model.DisqusService
{
    public interface IDisqusService
    {
        /// <summary>
        /// Validate API key and get username
        /// </summary>
        /// <returns>This method validates API key and returns username that is associated with it.</returns>
        IDisqusServiceResult<string> GetUserName();

        /// <summary>
        /// Get a forum API key for a specific forum
        /// </summary>
        /// <param name="forum_id"></param>
        /// <returns>Returns a string which is forum API key for a given forum.</returns>
        IDisqusServiceResult<string> GetForumApiKey(string forum_id);

        /// <summary>
        /// Gets individual forum API for updates and such.
        /// </summary>
        /// <param name="forum_id">Which forum to grab</param>
        /// <returns>The desired forum update api.</returns>
        IDisqusForumService GetForumApi(string forum_id);

        /// <summary>
        /// Get a list of websites that user owns
        /// </summary>
        /// <returns>Owned websites</returns>
        IDisqusServiceResult<IEnumerable<Forum>> GetForumList();


        /// <summary>
        /// Get a list of comments on a website
        /// </summary>
        /// <param name="forum_id"></param>
        /// <returns></returns>
        IDisqusServiceResult<IEnumerable<ThreadPost>> GetForumPosts(string forum_id);

        /// <summary>
        /// Count a number of comments in articles
        /// </summary>
        /// <param name="threadIds">IEnumerable of threadIds to find</param>
        /// <returns>nothing atm</returns>
        IDisqusServiceResult<ForumPostCount> GetNumPosts(IEnumerable<string> threadIds);

        /// <summary>
        /// Get a list of categories on a website
        /// </summary>
        /// <param name="forum_id">Forum id to get</param>
        /// <returns>Returns a list of categories that were created for a website (forum) provided. Returned data will contain category id, title, forum_id and boolean flag is_default.</returns>
        IDisqusServiceResult<IEnumerable<Category>> GetCategoriesList(string forum_id);

        /// <summary>
        /// Get a list of threads on a website
        /// </summary>
        /// <returns>Enumeration of Threads</returns>
        IDisqusServiceResult<IEnumerable<DisqusFullBodyThread>> GetThreadList(string forum_id, StartLimitArgs args);

        /// <summary>
        /// Get a list of threads with new comments
        /// </summary>
        /// <param name="forum_id">Forum to target</param>
        /// <param name="since">Start date for new posts; Format: 2009-03-30T15:41, Timezone: UTC</param>
        /// <returns>An enumeration of threads</returns>
        IDisqusServiceResult<IEnumerable<DisqusCategoryIdThread>> GetUpdatedThreads(string forum_id, DateTime since);


        /// <summary>
        /// Get a list of comments in a thread
        /// </summary>
        /// <param name="thread_id">Thread Id to get</param>
        /// <returns>Enumeration of up to 25 posts</returns>
        IDisqusServiceResult<IEnumerable<ThreadPost>> GetThreadPosts(string thread_id);

        /// <summary>
        /// Get a list of comments in a thread
        /// </summary>
        /// <param name="thread_id">Thread Id to get</param>
        /// <param name="args">Optional arguments</param>
        /// <returns>Enumeration of posts</returns>
        IDisqusServiceResult<IEnumerable<ThreadPost>> GetThreadPosts(string thread_id, GetPostArgs args);
        

    }
}